settings.outformat="pdf";
settings.tex="xelatex";
size(150);


struct Clock {
	// private variable
	private real pi=3.1416*2;

	private int h;
	private int m;
	private pair c;
	private real r;

	private real rMin;
	private real rHour;

	private pen bP=linewidth(2.5bp);
	private pen sP=linewidth(1bp);


	// h hour, m minute, c center, r radius
	void operator init (int h,int m,pair c=(0,0),real r=10) {
		this.h=h%12;
		this.m=m;
		this.c=c;
		this.r=r;

		this.rMin=0.85r;
		this.rHour=0.65r;
	}


	// draw Hour tick
	void hTick() {
		int Tn=12;

		for ( int i=0; i<Tn; ++i ) {
			draw( shift(this.c)*((r*0.89*cos(i*pi/Tn),r*0.89*sin(i*pi/Tn))--(r*cos(i*pi/Tn),r*sin(i*pi/Tn))), bP );
		}
	}

	// draw Minute tick
	void mTick() {
		int Tn=60;

		for ( int i=0; i<Tn; ++i ) {
			draw( shift(this.c)*((r*0.93*cos(i*pi/Tn),r*0.93*sin(i*pi/Tn))--(r*cos(i*pi/Tn),r*sin(i*pi/Tn))), sP );
		}

	}

	private void hNeedle() {
		real angle = -this.h * (pi/12) - this.m * (pi/(12*60)) + pi/4;
		pair hPoint = (this.rHour * cos(angle) , this.rHour * sin(angle) );
		draw( this.c -- hPoint, bP);
	}

	private void mNeedle() {
		real angle = -this.m * (pi/60) + pi/4;
		pair mPoint = (this.rMin * cos(angle) , this.rMin * sin(angle) );
		draw( this.c -- mPoint, sP);
	}

	void show() {
		dot(this.c, linewidth(3bp)+blue);
		draw( circle(this.c,this.r),bP );
		hTick();
		mTick();

		hNeedle();
		mNeedle();
	}
}

string time = getstring();
string name = replace(time,":","_");
string[] tt = split(time,":");

Clock c = Clock( (int)tt[0], (int)tt[1] );
c.show();
shipout(name);
